package com.xinhe.web.reposity;

import com.xinhe.web.entity.Role;
import com.xinhe.web.entity.RoleMenu;
import com.xinhe.web.entity.ServiceCenter;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Set;


public interface AuthRoleMenuRepository extends JpaRepository<RoleMenu, Long> {
    @Query("from RoleMenu where fRoleId = ?1")
    List<RoleMenu> findAuthRoleMenunByRoleid(Long fRoleId);
    @Modifying
    @Query(value = "delete from auth_role_menu where f_role_id = ?1", nativeQuery = true)
    void deleteByRoleId(Long roleId);
}